package com.youdianda.mapper;

import com.youdianda.entity.SysDict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youdianda.vo.TypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.lang.reflect.Type;
import java.util.List;

/**
 * <p>
 * 字典表 Mapper 接口
 * </p>
 *
 * @author sdy
 * @since 2023-05-15
 */
@Mapper
public interface SysDictMapper extends BaseMapper<SysDict> {


    /**
     * 根据type  获取value  label
     */
    @Select("select value ,label from sys_dict where type=#{type}")
    List<TypeVO> selectMap(String type);

}
